STM32CubeMX2 Context ¶
Purpose and scope ¶
The STM32CubeMX2 context provides two services for headless STM32CubeMX2 workflows: creating or configuring project models, and generating or exporting projects. It resolves board and MCU references, configures pins, peripherals, clocks, software parameters, middleware, utilities, and components, then can validate the project model when requested.
The context does not launch the STM32CubeMX2 graphical user interface, use GUI-backed extension commands, or ask for dialog-based interaction.
Context scope ¶
mx2.create-or-configure-projectcreates a project from an exact board or MCU reference, or opens and changes an existing.ioc2project. Validation is performed when requested.mx2.generate-exportgenerates or exports a project and verifies output artifacts. CMake with GCC is the default. IAR (EWARM) and AC6 (Open-CMSIS) are also supported.
Assets and capabilities ¶
The context is delivered in the
cube-agentic-ai-mx2-skill
bundle. It
requires the STM32CubeMX2 application bundle. That application is a separate
prerequisite from the connector. Install it if it is not already available.
Use STM32CubeMX2 application version 1.2.0 and ensure it is the only installed
stm32cubemx-application
version to avoid command collisions.
See the
STM32CubeMX2 command-line reference.
The context uses headless workflows and does not launch the STM32CubeMX2 graphical user interface. CMake/GCC is the default export. IAR and AC6 use their native EWARM and Open-CMSIS formats.
Cube commands ¶
The bundle command provides service discovery:
|
Command |
Use |
|---|---|
|
|
Show the context command help. |
|
|
Show the installed bundle version. |
|
|
List the available context services. |
The AI coding agent invokes the relevant focused skill. The skill uses the local STM32CubeMX2 command surface with the project path and target details from the request.
Typical prompts ¶
Create a project for the STM32 board NUCLEO-C562RE and validate it.Open this STM32CubeMX2 project and configure USART3 for the requested pins.Configure the clock tree and add the requested middleware.Generate a CMake/GCC project and verify its expected artifacts.Export this project in IAR format and verify its output files.